package edu.zqxy.eastmoney.controller;

import edu.zqxy.eastmoney.pojo.User;
import edu.zqxy.eastmoney.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.persistence.Column;

@Controller
@RestController
//controller+ResponseBody,返回json数据
@RequestMapping("/user")
public class UserController {
    @Autowired
  IUserService userService;
    @RequestMapping("/getUser")
    public User findById(int id){
        User user=userService.findById(id);
         return user;

    }




}
